package main

import (
	"encoding/gob"
	"flag"
	"fmt"
	"log"
	"luiz/crawler/model"
	"luiz/crawler_distributed/prcsupport"
	"luiz/crawler_distributed/worker"
)

var port = flag.Int("port", 0, "the port for me to listen")

func main() {
	flag.Parse()
	if *port == 0 {
		fmt.Printf("must specify a port")
	}
	log.Printf("%v", *port)
	gob.Register(model.House{})
	log.Fatal(prcsupport.ServeRpc(fmt.Sprintf(":%d", *port), worker.CrawlService{}))

}
